home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 023a / powerwks.zip / SREGR.DOC < prev    next >
Text File  |  1984-08-22  |  33KB  |  727 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.          SREGR - Simple Linear Regression 
  7.  
  8.  
  9.          1.  INTRODUCTION 
  10.  
  11.               Linear regression is a method  of finding the "best" straight
  12.          line through  a set  of points.   Each point  is described  by two
  13.          values, and if there is  a linear relationship between the values,
  14.          the points  will lie close  to a straight  line when plotted  on a
  15.          graph.   For  example,  we  might look  for  such  a  relationship
  16.          between: 
  17.  
  18.             -  sales of  the IBM PC  and sales of  the PC version  of Lotus
  19.                1-2-3 
  20.  
  21.             -  sales of Lotus 1-2-3 and of books about 1-2-3 
  22.  
  23.             -  prime interest rate and business bankruptcies 
  24.  
  25.               In  each of  the above  examples, we  might be  interested in
  26.          estimating the  value of  the second item  (Y, the  dependent var-
  27.          iable)  given a  value  for  the first  item  (X, the  independent
  28.          variable).  The SREGR worksheet will calculate the equation of the
  29.          best-fit  straight line  through  pairs of  X-Y  values, and  will
  30.          calculate estimates  of Y,  given X values,  from the  line.  This
  31.          worksheet is  a subset  of the LREGR  worksheet (contained  on the
  32.          Volume 1B disk).  It does  not calculate any confidence limits, or
  33.          the significance of the Student's  t value for the regression.  As
  34.          a result,  it  can  accept  more  pairs  of  input  values  for  a
  35.          particular  main memory  configuration, and  it calculates  faster
  36.          than LREGR. 
  37.  
  38.               The worksheet accepts pairs of values (labelled Y and X), and
  39.          calculates the values  of a and b in  the equation Y = a +  b X of
  40.          the  best-fit straight  line.  a is  often  called the  intercept,
  41.          because it is the point at which the line intercepts the Y-axis on
  42.          a graph, and b is the slope. 
  43.  
  44.               In  addition  to calculating  the  intercept  and slope,  the
  45.          worksheet calculates two of the  parameters a statistician uses to
  46.          appraise the quality of the fit.  These are: 
  47.  
  48.             -  the correlation  coefficient (r), which measures  the degree
  49.                of association between  X and Y. The value of  r always lies
  50.                between  1   and  -1.    A  value   of  zero   indicates  no
  51.                relationship;  a  value of  +1  or  -1 indicates  a  perfect
  52.                relationship.  The correlation  coefficient is negative when
  53.                larger values of X are associated with smaller values of Y. 
  54.  
  55.             -  the value of  Student's t for the hypothesis  that the slope
  56.                (b) is  zero (ie.  changing the  value of  X doesn't  have a
  57.                significant effect on the value of Y).  The larger the value
  58.                of t,  the less  we are inclined  to accept  the hypothesis.
  59.                Note the SREGR worksheet does not calculate the significance
  60.                of this t-value in probability terms (but you can look it up
  61.                in standard statistical tables). 
  62.  
  63.  
  64.          08/21/84                                                 SREGR - 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.               Statistical tables exist for  the correlation coefficient and
  74.          Student's  t, which  give the  probability that  such a  value (or
  75.          better) could be obtained purely by chance from random data. 
  76.  
  77.               For the purpose  of estimating the coefficients (a  and b) of
  78.          the regression equation, the worksheet uses all X-values for which
  79.          Y-values  are  supplied.   These  X-Y pairs  must  be  entered  in
  80.          consecutive  rows,  beginning  at  the  top  of  the  input  area.
  81.          However, you  may enter more  X-values below the ones  paired with
  82.          Y-values.  The  worksheet estimates the Y-values  corresponding to
  83.          all the X-values you enter.  This is useful if you want to use the
  84.          regression line as a forecasting pr estimating tool. 
  85.  
  86.  
  87.          2.  USING SREGR 
  88.  
  89.               The main menu of SREGR  offers you seven choices (plus Quit).
  90.          They are as follows: 
  91.  
  92.          Input 
  93.                This  choice   allows  you  to   enter  data  to   feed  the
  94.                calculations, and to change the  limit on the number of data
  95.                items you may  input.  There are two types of  data: the raw
  96.                X-Y pairs  from which  the regression  line is  derived, and
  97.                additional X  values for  which Y estimates  are calculated.
  98.                Note that changing the maximum number of data items involves
  99.                erasing all input  data.  Therefore, if you  think you might
  100.                need  more space  than the  worksheet initially  allows (300
  101.                pairs), you  should change  the limit  before you  enter any
  102.                data. 
  103.  
  104.          Blank 
  105.                You should choose this option  if you have finished with the
  106.                data in the worksheet and want  to start again with an empty
  107.                worksheet.  Note  that this option wipes  out all calculated
  108.                results as  well as  the raw data.   (You must  confirm this
  109.                choice to reduce the risk of accidental erasure.) 
  110.  
  111.          Calc 
  112.                Make this choice  when you want to  calculate or recalculate
  113.                the results.  If you have  changed data or entered more data
  114.                since  you  last  calculated, you  must  recalculate  before
  115.                displaying new results or graphs. 
  116.  
  117.          Results 
  118.                This option guides you through  the various results areas in
  119.                the worksheet.  The  main results are all shown  in the home
  120.                screen.  But there is a  screen full of intermediate results
  121.                (averages and sums of  squares, for example).  And alongside
  122.                the columns in which you entered the raw data are calculated
  123.                Y estimates.  To  print your results, select  Print from the
  124.                main menu (see below). 
  125.  
  126.          Graph 
  127.                One  of the  clearest ways  to show  a linear  regression is
  128.  
  129.  
  130.          08/21/84                                                 SREGR - 2
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.                though a graph.  This worksheet  offers one graph - a simple
  139.                one showing the original data points and the regression line
  140.                through them. 
  141.  
  142.          Print 
  143.                The print  option allows you  to send selected areas  of the
  144.                worksheet  to your  printer.  You  can select  two different
  145.                areas:  the final  and  intermediate results  areas (as  one
  146.                page), and the raw data and Y estimates. 
  147.  
  148.          Agenda 
  149.                If you select  this option (and confirm  it when requested),
  150.                the  current worksheet  is  lost and  replaced  by the  main
  151.                agenda.  Then you can load  another worksheet from the disk.
  152.                Note confirmation  is required before this  option proceeds,
  153.                because it will overwrite the worksheet in memory. 
  154.  
  155.          2.1 Input Details 
  156.  
  157.               The input  phase allows  you to  enter data  in a  variety of
  158.          ways.  The input menu has five choices (plus Quit). 
  159.  
  160.               The first and  second choices (XYPairs and  YXPairs) are very
  161.          similar.   If your  source  data  is arranged  as  two columns  of
  162.          numbers, these  choices will  handle all  pointer movement  as you
  163.          enter  your data  row-by-row.  If  the X  column is  on the  left,
  164.          select XYPairs;  if the Y column  is on the left,  select YXPairs.
  165.          Then enter your  data one row at  a time.  Type the  number on the
  166.          left  first, then  the number  on the  right.  After  each number,
  167.          press the ENTER  key.  Note that in the worksheet  the Y column is
  168.          always  on   the  left.   Selecting  XYPairs   or  YXPairs  merely
  169.          determines which column receives the first number of each pair you
  170.          type.  These two options (and Est-X) are convenient if you want to
  171.          use the numeric pad on your keyboard to enter the numbers, because
  172.          they perform all  the necessary cursor movement for  you.  You can
  173.          press the  Num Lock key to  disable the cursor movement  keys, and
  174.          use the numeric pad for numbers.   (Remember to press the Num Lock
  175.          key again when you've finished  entering your data, to re-activate
  176.          the cursor  movement keys.) When  you have entered all  your data,
  177.          hold down the Ctrl key and  press Break.  This will stop the macro
  178.          and exit  to 1-2-3  READY mode.   Then hold down  the Alt  key and
  179.          press I to return to the input menu.  If you choose either XYPairs
  180.          or YXPairs when  you have already entered some data,  the new data
  181.          will be added to the bottom  of the existing pairs (but overlaying
  182.          any unpaired  X values for  which Y estimates were  required).  To
  183.          get rid of existing pairs, you  must use the Blank option from the
  184.          main menu. 
  185.  
  186.               The third choice is Est-X.  It  allows you to add a column of
  187.          unpaired X  values below  the existing  data.  The  worksheet will
  188.          calculate a Y estimate for each  unpaired X value you enter.  Type
  189.          each value for X, and press  the ENTER key.  When you have entered
  190.          all the values, hold down the Ctrl key and press Break.  This will
  191.          stop the macro  and exit to 1-2-3 READY mode.   Then hold down the
  192.          Alt key and press I to return to the input menu. 
  193.  
  194.  
  195.  
  196.          08/21/84                                                 SREGR - 3
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.               The fourth choice  uses the standard 1-2-3  Range Input facil
  205.          ity.  In some respects this is convenient, because it confines the
  206.          cell  pointer to  the  unprotected  cells in  the  X  and Y  input
  207.          columns.  And  pressing the  Esc key returns  you directly  to the
  208.          input menu.  However, you are  responsible for all cursor movement
  209.          within the input  area.  So you cannot easily use  the numeric pad
  210.          to  enter your  numbers with  this  option.  Remember  to enter  Y
  211.          values on the  left (column B), and X values  on the right (column
  212.          C). 
  213.  
  214.               The final  choice (except Quit)  in this menu is  Number.  It
  215.          allows you  to set the maximum  number of input values.   When the
  216.          SREGR worksheet  is first loaded,  it is  limited to 300  pairs of
  217.          input values.  If  your machine has less than 256K  of memory, you
  218.          will not be  able to enter even this many  pairs without a 'Memory
  219.          Full' error.   However, if your  machine has more memory,  you may
  220.          use this option to increase the amount of data you can input.  You
  221.          must confirm  your intention to  use this option, because  it will
  222.          erase any data in the input area. 
  223.  
  224.               There will  come a time when  you have entered data  into the
  225.          worksheet, but  you need to  re-size the input area  (for example,
  226.          because you underestimated the amount  of data).  When you re-size
  227.          the area,  the worksheet will erase  your input.  But you  can use
  228.          the /File Xtract option of 1-2-3 to save the data you have entered
  229.          and avoid re-typing it.  Here's how. 
  230.  
  231.                    To save the input data,  first exit to 1-2-3 READY mode,
  232.                then press  the Goto  key (F5), type  the word  'input', and
  233.                press the ENTER key.  You will find yourself at the top left
  234.                corner of  the input  area.  Then  type the  following 1-2-3
  235.                command (initial letters only): 
  236.  
  237.                    /File Xtract Values  
  238.  
  239.                1-2-3 will  prompt you for a  file name.  Choose a  name for
  240.                the data,  type it, and  press ENTER.   If a file  with this
  241.                name  already  exists, 1-2-3  will  ask  you  if it  may  be
  242.                replaced (ie.  if 1-2-3  may overwrite  it).  When  you have
  243.                chosen the file name, 1-2-3 asks you to specify the range to
  244.                be  saved.   Press the  keys  Right  End Down  in  sequence,
  245.                followed by the  ENTER key.  Here, Right means the  6 key on
  246.                the numeric pad (in cursor mode),  and Down means the 2 key.
  247.                1-2-3 will then save your data  on disk, and you may proceed
  248.                to re-size the input area.  (Hold down the Alt key and press
  249.                M to return to the main menu.) 
  250.  
  251.                    When you have re-sized the  input area, you can retrieve
  252.                your data from  the disk by exiting to 1-2-3  READY mode and
  253.                moving  to  the  top  left  corner of  the  input  area  (as
  254.                described  above).  Then  type the  following 1-2-3  command
  255.                (initial letters only): 
  256.  
  257.                    /File Combine Copy Entire-file 
  258.  
  259.                1-2-3 will present  a menu of the files on  disk, from which
  260.  
  261.  
  262.          08/21/84                                                 SREGR - 4
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.                you should select  the one you saved (or type  its name) and
  271.                press the  ENTER key.   1-2-3 will  then retrieve  your data
  272.                from the disk into the worksheet.  Hold down the Alt key and
  273.                press M to return to the main menu. 
  274.  
  275.               There is one more option  available to you for inputting data
  276.          to  this worksheet.   That  is  to use  the  1-2-3 commands.   For
  277.          example, you may  already have the input data  for your regression
  278.          analysis stored in a worksheet on  disk.  If the data occupies two
  279.          adjacent  columns in  the worksheet,  with  Y values  in the  left
  280.          column, you can use 1-2-3's /File Combine Copy command to copy the
  281.          data into the LREGR worksheet.  To  do this, simply choose Quit at
  282.          the main menu, press the Goto key (F5), type the word 'input', and
  283.          press ENTER.  You will find yourself at the top left corner of the
  284.          data input area.   Now you can type /fcc and  follow the remaining
  285.          1-2-3 instructions  to copy the  data from the worksheet  on disk.
  286.          When  you have  finished, hold  down the  Alt key  and press  I to
  287.          return to  the input menu.   Note, do not  use /Move to  move data
  288.          around  in  the  worksheet.   Moving   data  into  a  named  range
  289.          invalidates the range name along  with any formulas that depend on
  290.          it.   You  will  probably   destroy  the  worksheet's  ability  to
  291.          calculate properly if you use /Move commands in it. 
  292.  
  293.          2.2 Graph Details 
  294.  
  295.               The  macro   that  displays  the  graph   in  this  worksheet
  296.          deliberately  avoids setting  many of  the graph  parameters.  For
  297.          example, the labels for the X-  and Y- axes are initially set when
  298.          the worksheet is loaded, and are  not changed.  If you wish to use
  299.          your own labels,  exit to 1-2-3 READY mode and  change them.  Then
  300.          hold down the Alt key and press M to return to the main menu.  The
  301.          following  is a  list of  the graph  options that  are set  by the
  302.          macro.  Attempts to reset these options will be futile. 
  303.  
  304.               - Graph subtitle 
  305.               - Graph type and ranges 
  306.               - Legends for ranges 
  307.               - Range formats 
  308.  
  309.               To get  a printed copy of  any graph, first display  it using
  310.          the graph  menu.  The last-displayed  graph is called  the current
  311.          graph.  Then exit to 1-2-3 READY mode.  Press the Graph key (F10),
  312.          and verify the  graph.  If you wish, you may  use the 1-2-3 /Graph
  313.          commands  to modify  the  graph before  printing.   Then type  the
  314.          following 1-2-3 command (initial letters only): 
  315.  
  316.               /Graph Save 
  317.  
  318.          1-2-3 will ask you  to specify a file name, and  save the graph in
  319.          that file.  You  may then use the PrintGraph program  to print the
  320.          graph.  For  instructions on  how to  use the  PrintGraph program,
  321.          read the PrintGraph section of the 1-2-3 manual. 
  322.  
  323.          2.3 Print Details 
  324.  
  325.               The print  macros assume  you have a  printer capable  of 80-
  326.  
  327.  
  328.          08/21/84                                                 SREGR - 5
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.          column printing.   Before printing  each option, the  macros allow
  337.          you to align the paper to the  top of a new page.  Press the ENTER
  338.          key when  you are ready  for printing to  begin.  At the  end, the
  339.          macro  will feed  the paper  to the  top of  a new  page so  that,
  340.          normally, you won't have to keep re-aligning the paper. 
  341.  
  342.               The  final  and  intermediate  results are  printed  as  one,
  343.          because they will comfortably fit  onto a 66-line page.  The third
  344.          option can lead to several pages of output.  The macro defines the
  345.          top border  of the  page to be  the rows of  the worksheet that
  346.          identify the columns being printed. 
  347.  
  348.  
  349.          3.  EXAMPLES 
  350.  
  351.          3.1 Radio or Television? 
  352.  
  353.               In the U.K., one must buy a television licence before one can
  354.          legally  receive  television programs.   Prior  to  1971, a  radio
  355.          licence was required to receive radio signals, unless one bought a
  356.          television licence  which covered  both.  With  the rise  of tele-
  357.          vision in the home, one might expect a fall in the number of radio
  358.          licences  issued.   Indeed,  one   might  expect  that  for  every
  359.          television licence bought,  one less radio licence  would be sold,
  360.          since  most people  owned radios  before they  bought televisions.
  361.          The numbers of radio and  television licences issued for the years
  362.          1949 to 1968 are shown in the following table: 
  363.  
  364.                    Radio and Television Licences 
  365.                    Issued in the United Kingdom. 
  366.  
  367.                    YEAR RADIO TELEVISION 
  368.                                   (Millions)   
  369.                    1949  11.7    0.1 
  370.                    1950  12.0    0.3 
  371.                    1951  11.6    0.7 
  372.                    1952  11.2    1.4 
  373.                    1953  10.7    2.2 
  374.                    1954  10.2    3.2 
  375.                    1955   9.4    4.4 
  376.                    1956   8.6    5.6 
  377.                    1957   7.6    6.8 
  378.                    1958   6.6    8.0 
  379.                    1959   5.4    9.2 
  380.                    1960   4.5   10.4 
  381.                    1961   3.9   11.2 
  382.                    1962   3.5   11.9 
  383.                    1963   3.2   12.5 
  384.                    1964   3.0   13.0 
  385.                    1965   2.8   13.3 
  386.                    1966   2.6   13.7 
  387.                    1967   2.5   14.3 
  388.                    1968   2.5   15.0 
  389.  
  390.  
  391.               This table clearly shows the growth of television licences at
  392.  
  393.  
  394.          08/21/84                                                 SREGR - 6
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.          the  expense  of  radio  licences.   The data  in  this  table  is
  403.          contained  on your  disk in  a worksheet  named TV.  To use  it to
  404.          illustrate the regression analysis, perform the following steps: 
  405.  
  406.          1.    Load the  SREGR worksheet  and when  the main  menu appears,
  407.                Press Q to exit to 1-2-3 READY mode. 
  408.          2.    Press  the Goto  key (F5),  then type  the word  'input' and
  409.                press the ENTER key. 
  410.          3.    Type the following 1-2-3 command (initial letters only): 
  411.                    /File Combine Copy Entire-file TV 
  412.                and press  the ENTER  key.  This will  bring the  saved data
  413.                into the input area of your worksheet. 
  414.          4.    Hold down the  Alt key and press M. This  will return you to
  415.                the main menu. 
  416.          5.    Choose the Calc option.  When calculations are complete, you
  417.                may use the results, graph, and print phases. 
  418.  
  419.               The  results  show  a highly  significant  correlation.   The
  420.          surprising part of  the answer, however, is that the  slope of the
  421.          regression  line is  -1.425, and  not,  as one  might expect,  -1.
  422.          Moreover the standard deviation of the  slope - S(b) - is so small
  423.          (0.03) that  it is inconceivable that  the real slope is  -1 given
  424.          the observations we  have.  This means the increase  in the number
  425.          of television licences sold exceeds  the decrease in the number of
  426.          radio licences by about 40%.  Since  anyone who bought or rented a
  427.          television almost  certainly used  a radio, one  must look  for an
  428.          explanation. 
  429.  
  430.               A  possible  explanation for  the  difference  is that  radio
  431.          licences were not treated seriously.   It was common for people to
  432.          use unlicenced radio receivers, and few were prosecuted.  But when
  433.          television licences  were introduced, the  need for a  licence was
  434.          publicised, and  users of  unlicenced televisions  were prosecuted
  435.          more actively.  The 40% difference  is likely due to people buying
  436.          a television  licence when  before they  did not  bother to  buy a
  437.          radio licence.  Another likely  explanation is that the population
  438.          of viewers was growing in total. 
  439.  
  440.               The   correlation  coefficient   (r)   for  this   particular
  441.          regression is -0.9962, which is  very close to -1 (meaning perfect
  442.          correlation).  If  you examine  the graph, you  will see  that the
  443.          points do indeed lie very close to a straight line. 
  444.  
  445.               A note of warning is in order here.  It can be very dangerous
  446.          to assume that a  cause-and-effect relationship exists between two
  447.          factors, even  when the  fit is  this good.   One should  take the
  448.          results of  any statistical analysis  with a large grain  of salt,
  449.          unless there is a prior  expectation of cause-and effect.  In this
  450.          particular  case, we  do have  such expectation  because owning  a
  451.          television  licence  removed the  need  to  buy a  radio  licence.
  452.          Measurements such  as these that are  taken over a period  of time
  453.          can  be influenced  by external  factors which  change over  time.
  454.          This  can lead  to  an  apparent relationship  when  in fact  none
  455.          exists.   For  example,  television  sales over  some  years  were
  456.          positively  correlated  with  admissions to  mental  institutions.
  457.          This statement could hardly  justify an assertion that televisions
  458.  
  459.  
  460.          08/21/84                                                 SREGR - 7
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.          cause mental illness!  Both simply happened to be growing over the
  469.          period the figures were observed. 
  470.  
  471.          3.2 Example 2 - Fictitious Data 
  472.  
  473.               This example  leads you  through a  complete analysis  of the
  474.          data given in the following table: 
  475.  
  476.               Linear Regression 
  477.               Fictitious Data 
  478.               X value Y value 
  479.                    1       3 
  480.                    3       5 
  481.                    5       6 
  482.                    7       8 
  483.                    9      12 
  484.                    11     12 
  485.  
  486.               Once  you  have loaded  the  SREGR  worksheet, the  following
  487.          keystrokes will perform the analysis: 
  488.  
  489.          Keystrokes     Comments 
  490.  
  491.          {ENTER}         Press the ENTER key to  select the Input choice in
  492.                          the main menu. 
  493.  
  494.          X               Choose  the  XYPairs  option in  the  input  menu,
  495.                          because this  is how the source  data is arranged.
  496.                          Note that the macro will place the cell pointer in
  497.                          the topmost cell of the X value input column. 
  498.  
  499.          1 {ENTER}       This enters  the first  X value  in the  top cell.
  500.                          The macro will move the cell pointer one column to
  501.                          the left to receive the first Y value. 
  502.  
  503.          3 {ENTER}       Enters the first Y value.  The macro will now move
  504.                          the cell pointer to the  right and down so you can
  505.                          enter the second X value. 
  506.  
  507.          3 {ENTER}       Enter the remaining values. 
  508.          5 {ENTER} 
  509.  
  510.          5 {ENTER} 
  511.          6 {ENTER} 
  512.  
  513.          7 {ENTER} 
  514.          8 {ENTER} 
  515.  
  516.          9 {ENTER} 
  517.          12 {ENTER} 
  518.  
  519.          11 {ENTER} 
  520.          12 {ENTER} 
  521.  
  522.          {Ctrl} {Break}  Having entered all the  pairs of values, hold down
  523.                          the  Ctrl key  and  press Break.   This stops  the
  524.  
  525.  
  526.          08/21/84                                                 SREGR - 8
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.                          macro, and returns you to 1-2-3 READY mode. 
  535.  
  536.          {Alt} I         Hold down the Alt key,  and press I.  This returns
  537.                          you to the input menu. 
  538.  
  539.          E               Select  Est-X   to  obtain  estimates  of   Y  for
  540.                          specified X values.  The  macro positions the cell
  541.                          pointer at  the first cell  in the X  input column
  542.                          below the values you have already input. 
  543.  
  544.          0 {ENTER}       Enter  the  X  values   for  which  estimates  are
  545.                          required. 
  546.          2 {ENTER} 
  547.          4 {ENTER} 
  548.          6 {ENTER} 
  549.          8 {ENTER} 
  550.          10 {ENTER} 
  551.          12 {ENTER} 
  552.  
  553.          {Ctrl} {Break}  Return to the input menu. 
  554.          {Alt} I 
  555.  
  556.          Q               Return to main menu. 
  557.  
  558.          C               Perform the calculations. 
  559.  
  560.               At this  point, all the  results have been obtained,  and you
  561.          can display them by choosing Results in the main menu.  Here's how
  562.          (starting at the main menu):  
  563.  
  564.          R               Takes you to the Results menu from the main menu. 
  565.  
  566.          {ENTER}         Displays the  final results on the  'home' screen.
  567.                          (Typically,  you  will  already  be  on  the  home
  568.                          screen,  and  this  option will  have  no  visible
  569.                          effect.)  On   this  screen,  you  can   read  the
  570.                          calculated  regression  equation, the  correlation
  571.                          coefficient, and the Student's t value for testing
  572.                          the significance of the regression.  
  573.  
  574.          I               Displays the  intermediate results.  Here  you can
  575.                          see the  number of (paired) observations,  and the
  576.                          mean of  the (paired)  X and  Y values.   The last
  577.                          line on  this screen shows the  standard deviation
  578.                          of  the  slope,  which   is  used  to  derive  the
  579.                          Student's t statistic for the significance test of
  580.                          the regression. 
  581.  
  582.          R               Displays the raw data.   The display starts at the
  583.                          first screen-full  of data, but you  are presented
  584.                          with a menu that allows  you to scroll up and down
  585.                          one screen-full at a time.  Note the macro sets up
  586.                          a window  so   the  column  headings   are  always
  587.                          displayed above  the data  columns.  You  will not
  588.                          need to scroll for this small set of data. 
  589.  
  590.  
  591.  
  592.          08/21/84                                                 SREGR - 9
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.          Q               Returns you to the results menu. 
  601.  
  602.          Q               Returns  you to  the  main menu  from the  results
  603.                          menu. 
  604.  
  605.  
  606.               You  can display  the  graph provided  by  this worksheet  as
  607.          follows: 
  608.  
  609.          G               Takes you from the main menu to the graphics menu.
  610.                          Initially, the graphs  are set up to  display on a
  611.                          color monitor.   If you have a  monochrome monitor
  612.                          (with a  graphics adaptor  card), you  should type
  613.                          the following three commands: 
  614.  
  615.               O          Selects the graphics options menu. 
  616.  
  617.               B          Tells 1-2-3 to plot graphs in monochrome (B&W). 
  618.  
  619.               Q          Returns you to the graphics menu. 
  620.  
  621.          R               Displays the  graph showing  the raw  data points,
  622.                          and the  regression line through them.   From this
  623.                          graph, you  can see how  well (or not)  the points
  624.                          follow the straight line.  Press any key to return
  625.                          to the graphics menu. 
  626.  
  627.          Q               Returns you to the main menu. 
  628.  
  629.               If you  wish, you  may Quit  all menus and  set up  the graph
  630.          title (not subtitle),  and the X- and Y-axis legends  to suit your
  631.          needs.  Then use  Alt-M to return to the menus  and re-display the
  632.          graph.  Since the  graphics macro does not  reset these parameters
  633.          each time, they will appear on the graph as you have set them. 
  634.  
  635.               To print the results, first  make sure your printer is turned
  636.          on and  loaded with  paper.  Then,  from the  main menu,  type the
  637.          following: 
  638.  
  639.          P               To go to the print menu. 
  640.  
  641.          R               To  print  the  final  and  intermediate  results.
  642.                          Press  ENTER when  you are  ready for  printing to
  643.                          begin. 
  644.  
  645.          D               To  print the  raw  data and  Y estimates.   Press
  646.                          ENTER when you are ready for printing to begin. 
  647.  
  648.          Q               To return to the main menu. 
  649.  
  650.               Before starting each section of  output, the macros pause for
  651.          you to align the paper.  After  each section of output, they space
  652.          to the top of the next page,  so you should only have to align the
  653.          paper once - before the first section. 
  654.  
  655.  
  656.  
  657.  
  658.          08/21/84                                                 SREGR - 10
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.          Menu Tree for SREGR Worksheet 
  667.  
  668.          Input    -  Input X-Y data.  
  669.          .  XYPairs  -  Input X-Y pairs of values (X first). 
  670.          .  YXPairs  -  Input Y-X pairs of values (Y first). 
  671.          .  Est-X    -  Enter X values to obtain Y estimates. 
  672.          .  Range    -  Use 1-2-3 standard Range Input facility. 
  673.          . Number - Set maximum number of data pairs (erases data). 
  674.          .  .  No       -  Do not erase or resize data area. 
  675.          .  .  Yes      -  Erase and resize data area. 
  676.          .  Quit     -  Return to main menu. 
  677.  
  678.          Blank    -  Blank out data input area. 
  679.          .  No       -  Do not blank out input area; return to main menu. 
  680.          .  Yes      -  Blank out input area, then return to main menu. 
  681.  
  682.          Calc     -  Calculate all results. 
  683.  
  684.          Results  -  Display results on the screen. 
  685.          .  Final    -  Show final results (regression equation, etc.). 
  686.          .  Intermed -  Show intermediate results (sums of squares, etc.). 
  687.          .  Rawdata  -  Show raw input data and Y estimates. 
  688.          .  .  Down     -  Scroll down one screen. 
  689.          .  .  Up       -  Scroll up one screen. 
  690.          .  .  Quit     -  Return to results menu. 
  691.          .  Quit     -  Return to main menu. 
  692.  
  693.          Graph    -  Display graphs. 
  694.          .  Rawdata  -  Display graph of input data and regression line. 
  695.          .  Options  -  Select graph options. 
  696.          .  .  Color    -  Display graphs in color. 
  697.          .  .  B&W      -  Display graphs in monochrome. 
  698.          .  .  Quit     -  Return to graph menu. 
  699.          .  View     -  Re-display the last-seen graph. 
  700.          .  Quit     -  Return to main menu. 
  701.  
  702.          Print    -  Send results to printer. 
  703.          .  Results  -  Print final and intermediate results. 
  704.          .  Data     -  Print raw data and Y estimates. 
  705.          .  Quit     -  Return to main menu. 
  706.  
  707.          Agenda   -  Return to worksheet agenda. 
  708.          .  No       -  Do not leave this worksheet; return to main menu. 
  709.          .  Yes      -  Clear this worksheet and load agenda. 
  710.  
  711.          Quit     -  Exit to 1-2-3 READY mode. 
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.          08/21/84                                                 SREGR - 11
  725.  
  726.  
  727.